*windows sends a message to the program " means windows calls function within the program.this functin in your programm is known as the window procedure".

*every window that a programm creates has an associated window procedure.this window procedure is a function that could be either in the program itself or in a dynamic link library.

*A window is always created based on a "windows class." the use of the window class allows multiple windows to be based on the same windows class & hence use the same windows procedure.

*A windows  procedure process message to the windows these message inform a windows of user input from the keyboard or the mouse

*when a windows programm begins executions ,windows create a"message qupue stores message inform a window appllication includes a short chunk of code called the message loop" to retrive these message from the queue and dispatch them to the appropriate window procedure 

*other message are sent directly to the windows procedure without being places int the message queue.